#ifndef __physics_testsH__
#define __physics_testsH__

#include "physics.h"
#include "physics_vehicle.h"
#include "3d_primitives.h"

namespace WtfEngine
{
	class VectorArrow : public Renderable
	{
	public:
		VectorArrow(const tPosition& p, const tDirection& v)
			: Renderable(tCreationOptions(), new WtfGraphics::Primitives::Oblong(v.length(), 0.1, 0.1)){
			//setPosition(p - (v * 0.5));
		};
	};
	
	namespace PhysicsTests
	{
		class Projectile : public Physical
		{
		public:
			Projectile(const tVector& pos, const tDirection& vel);

			void Update() {};

			static void BindMouseClick();
		};

		class Particle : public Physical
		{
		public:
			Particle(const tPosition& pos, const tDirection& vel);

			void Update() {};

			static void TestThem();
		};

		class Stacking : public Task<Stacking>
		{
		public:
			Stacking()
				: Task<Stacking>(450, "Physics: Stacking test"){};

		protected:
			void Run();
		};

		class Vehicle: public WtfEngine::Vehicle {
		public:
			Vehicle();

		private:
			void Accelerate(tScalar amt);
			void Brake(tScalar amt);
			void HandBrake(tScalar amt);
			void Steer(tScalar amt);
		};

		class RayCast: public Functor {
			Physical::tRef	mrSelectedObj;

		public:
			RayCast();

			void operator () ();
			void OnMouseMove();
			void OnMouseUp();

			GC_AUTOSIZE(RayCast);
		};
	};
};

#endif
